//
//  WBTitleView.swift
//  SinaWeibo_Swift
//
//  Created by TianZhen on 16/4/14.
//  Copyright © 2016年 TianZhen. All rights reserved.
//

import UIKit

class WBTitleView: UIButton {

    override func layoutSubviews() {
        super.layoutSubviews()

        titleLabel?.frame.origin.x = 0
        imageView?.frame.origin.x = titleLabel!.frame.width
        
    }
    
    convenience init(title: String)
    {
        self.init()
        setTitle(title, forState: UIControlState.Normal)
        setImage(UIImage(named: "navigationbar_arrow_down"), forState: UIControlState.Normal)
        setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        sizeToFit()
    }
}
